<template>
	<view class="list-block">
		<view class="item" v-for="(item,index) in list" :key=" 'orderlist' +item.id">
			<view class="content">
				<view class="block-content" @click="toShopping(item)">
					<view class="block-content__name">{{item.name}}</view>
					<view class="block-content__time" @click="toShopping(item)">{{item.title}}</view>
					<view class="block-content__images">
						<image :src="item.image" mode="widthFix" :data-src="item.image"></image>
					</view>

					<view class="block-content__more" @click="toShopping(item)">
						<uni-icons color="#e6e6e6" type="eye"></uni-icons><text
							class="block-content__more-txt">详情</text>
					</view>
				</view>
			</view>
		</view>

	</view>
</template>

<script>
	import {
		handleNtoBrSplice
	} from '@/utils/index.js'
	export default {
		props: {
			list: {
				type: Array,
				default () {
					return []
				}
			}
		},
		data() {
			return {

			};
		},
		filters: {
			handleNtoBrSplice(time) {
				return handleNtoBrSplice(time)
			}
		},
		methods: {
			// 商品详情页
			toShopping(item) {
				uni.navigateTo({
					url: '/pages/shopping/shopping?id=' + item.id,
					success: res => {},
					fail: () => {},
					complete: () => {}
				});

			}
		}
	}
</script>

<style lang="scss">
	.mescroll-body {
		padding-bottom: 120rpx;
	}

	.item {
		padding-top: 10px;
		border-bottom: 1px solid #eee;
	}

	.content {
		display: flex;
		justify-content: space-between;
		padding: 10px;

		.block-content {
			flex: 1;
			font-size: 15px;
			position: relative;
			overflow: hidden;

			.block-content__type {
				font-size: 12px;
				border: 1px solid red;
				margin-left: 10px;
				padding: 1px 6px;
				color: red;
				border-radius: 4px;
			}

			.block-content__images {
				display: flex;
				flex-wrap: wrap;
				margin-top: 5px;
				overflow: hidden;

				.block-content__images-image {
					width: 80px;
					font-size: 0;
					margin-right: 2px;
					margin-top: 2px;
					font-size: 0;
					position: relative;

					image {
						width: 80px;
						height: auto;
					}

					.block-content__images-image-more {
						position: absolute;
						top: 0;
						left: 0;
						right: 0;
						bottom: 0;
						background: rgba(0, 0, 0, .3);
						z-index: 2;
						color: #fff;
						font-size: 14px;
						display: flex;
						justify-content: center;
						padding: 24%;
						text-align: center;
						line-height: 1.6;
					}
				}
			}

			.block-content__name {
				color: #000;
			}

			.block-content__time {
				color: rgb(44, 62, 80);
				font-size: 12px;
				margin-top: 5px;
			}

			.block-content__desc {
				color: rgb(44, 62, 80);
				margin-top: 5px;
				overflow: hidden;

			}

			.block-content__more {
				position: absolute;
				top: 0;
				right: 0;
				color: #2f3f52;
				font-size: 12px;
				display: flex;
				align-items: center;

				.block-content__more-txt {
					margin-left: 4px;
				}
			}
		}
	}

	.zu {
		display: flex;
		justify-content: space-between;
		font-size: 12px;
		padding: 10px 0;

		.zu-item {
			flex: 1;
			text-align: center;
			display: flex;
			align-items: center;
			justify-content: center;
			box-sizing: border-box;

			&:nth-child(2) {
				border-left: 1px solid #eee;
				border-right: 1px solid #eee;
			}

			text {
				margin-left: 4px;
			}
		}
	}

	.fot {
		padding: 10px 0 10px 60px;
		font-size: 12px;
		color: gray;
	}

	image {
		width: 100%;
		height: 100%;
	}
</style>
